package cn.com.dhcc.app.pub.core.util.settlement.compute.task;

import cn.com.dhcc.app.pub.core.util.settlement.compute.store.ComputeResultVo;
import cn.com.dhcc.app.pub.core.util.settlement.compute.store.DataProcessHandler;

import java.util.Date;
import java.util.concurrent.Callable;


/**
 * 获取数据结算结果
 * @author Administrator
 *
 */
public class DataComputeResultTask implements Callable<ComputeResultVo> {

	private String taskId;//任务id
	private String tableName;//结算的表名
	private Date date;//结算日期
	
	
	private DataProcessHandler processHandler;
	
	
	
	public DataComputeResultTask(String taskId, String tableName, Date date,
			DataProcessHandler processHandler) {
		super();
		this.taskId = taskId;
		this.tableName = tableName;
		this.date = date;
		this.processHandler = processHandler;
	}



	@Override
	public ComputeResultVo call() throws Exception {
		ComputeResultVo vo=new ComputeResultVo();
		try {
			vo=processHandler.loadResult(taskId,tableName, date);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return vo;
	}
	
}
